Skip to content

Simplify closureForState in epsilon closure#550

Merged
timbray merged 1 commit into
timbray:mainfrom
sayrer:simplify-epsilon-closure
Jun 18, 2026
Merged

Simplify closureForState in epsilon closure#550
timbray merged 1 commit into
timbray:mainfrom
sayrer:simplify-epsilon-closure

Conversation

@sayrer

@sayrer sayrer commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

This doesn't change anything structural, just makes it easier to read. See #549.

Pure code-motion cleanup of closureForState; no behavioral or performance change (interleaved benchstat over the build path shows no significant difference in time/bytes/allocs).

  • Hoist state.table.isEpsilonOnly() into a single named local (selfWasCollected), replacing three separate calls each re-explaining the same epsilon-only caveat.
  • Extract the table-share dedup post-pass into dedupByTableShare, shrinking closureForState to its core narrative and isolating the unsafe.Pointer share-group logic.

Pure code-motion cleanup of closureForState; no behavioral or performance
change (interleaved benchstat over the build path shows no significant
difference in time/bytes/allocs).

- Hoist state.table.isEpsilonOnly() into a single named local
  (selfWasCollected), replacing three separate calls each re-explaining the
  same epsilon-only caveat.
- Extract the table-share dedup post-pass into dedupByTableShare, shrinking
  closureForState to its core narrative and isolating the unsafe.Pointer
  share-group logic.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@timbray timbray merged commit f0ff69f into timbray:main Jun 18, 2026
7 checks passed
@sayrer sayrer deleted the simplify-epsilon-closure branch June 20, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants